package design.patterns.commandmodel.audioplayerdemo;

import design.patterns.commandmodel.simpledemo.Command;

/**
 * @Desc:   具体命令类
 * @author: cww
 * @DateTime: 2020-06-13 10:59
 */

public class StopCommand implements Command {

    private AudioPlayer myAudio;

    public StopCommand(AudioPlayer myAudio) {
        this.myAudio = myAudio;
    }

    @Override
    public void execute() {
        myAudio.stop();
    }
}
